import request from '@/utils/request'

/**
 * 获取权限点列表
 * @returns Promise<[]>
 */
export const perGetPermissionListApi = () => request.get('/sys/permission')

/**
 * 新增权限点
 * @param {*} data
 * @returns Promise<Object>
 */
export const perAddPermissionApi = (data) => request.post('/sys/permission', data)

/**
 * 修改权限点
 * @param {*} data
 * @returns Promise<Object>
 */
export const perUpdatePermissionApi = (data) => request.put(`/sys/permission/${data.id}`, data)

/**
 * 删除权限点
 * @param {*} id
 * @returns Promise<Object>
 */
export const perDeletePermissionAPi = (id) => request.delete(`/sys/permission/${id}`)
